import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


public class daysBetween {

	public static Date getDate(String source){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		try {
			Date date = sdf.parse(source);
			return date;
		} catch (ParseException e) {
			e.printStackTrace();
			return null;
		}

	}

	public static int countDays(String beginDate,String endDate){
		double times = getDate(endDate).getTime()- getDate(beginDate).getTime();
		int days = (int)times/(1000*60*60*24);
		return days;
	}
	//	public static int countDays(String beginDate){
	//		double times = new Date().getTime() - getDate(beginDate).getTime();
	//		int days = (int)times/(1000*60*60*24);
	//		return days;
	//	}

	public static void main(String[] args) throws ParseException {
//		System.out.println(countDays("1991-07-01", "2015-04-01"));
		//		System.out.println(countDays("1990-07-01"));
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		long to = df.parse("2015-4-10").getTime();   
//		long from = df.parse("2008-4-10").getTime();  
		long from = new Date().getTime();
		System.out.println((to - from) / (1000 * 60 * 60 * 24));
	}
}
